import React, { Component } from 'react';
import './App.css';
import {
  Route,
  Link
} from 'react-router-dom';

import PageHome from './PageHome.js';
import PageNews from './PageNews.js';
import PageInfo from './PageInfo.js';

class App extends Component {
	
	constructor(props) {
		super(props);
		// 设置 initial state
		this.state = {
			msg: '分页组件：DiReactPagination '
		};
	}
	
  render() {
    return (
      <div className="App" id="app">
	  		<h1>{this.state.msg}</h1>
	  		<ul className="nav">
				<li>
					<Link to="/">首页</Link>
				</li>
				<li>
					<Link to="/PageNews">单个分页演示</Link>
				</li>
				<li>
					<Link to="/PageInfo">使用说明</Link>
				</li>
			</ul>
        	<div>
				<Route exact path="/" component={PageHome}/>
				<Route exact path="/PageNews" component={PageNews}/>
				<Route exact path="/PageInfo" component={PageInfo}/>
			</div>
      </div>
    );
  }
}

export default App;
